package com.gee.spring.boot.rpf.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.gee.spring.boot.rpf.common.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonView;
/**
 * <p>
 *  实体类
 * 接口参数初始化来源
 * </p>
 *
 * @author gee
 * @since 2021-02-05
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="ParamSource对象", description="接口参数初始化来源")
public class ParamSource extends BaseEntity<ParamSource> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "流水号")
    @TableId(value = "serialNo", type = IdType.AUTO)
    @JsonView
    private Long serialNo;

    @ApiModelProperty(value = "参数名称")
    @TableField("paramName")
    @JsonView
    private String paramName;

    @ApiModelProperty(value = "参数类型1-String, 2-Boolean, 3-Integer, 4- Double")
    @TableField("paramType")
    @JsonView
    private Integer paramType;

    @ApiModelProperty(value = "字段来源1-request, 2-calVariable, 3-Client. 4-factor")
    @TableField("paramSourceType")
    @JsonView
    private Integer paramSourceType;

    @ApiModelProperty(value = "当paramSourceType为3时的clientId")
    @TableField("clientId")
    @JsonView
    private String clientId;

    @ApiModelProperty(value = "是否在用: 0-不在用, 1-在用")
    @TableField("inUse")
    @JsonView
    private Integer inUse;


    @Override
    public Serializable pkVal() {
        return this.serialNo;
    }

}